/*
 * Copyright (c) 2006 - 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.*;

/**
 * <p>Project: app2022 - T1
 * <p>Powered by webrx On 2022-02-08 15:45:26
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
@Slf4j
@DisplayName("测试数据库常用操作")
public class T1 {

    @BeforeAll
    static void all() {
        System.out.println("@BeforeAll");
    }

    @AfterAll
    static void ac() {
        System.out.println("@Afterall");
    }

    @BeforeEach
    void connect() {
        System.out.println("连接数据库");
    }

    @AfterEach
    void close() {
        System.out.println("关闭数据库");
    }


    @Test
    @DisplayName("删除数据库记录")
    void delete() {
        System.out.println("delete from db.student where 1");
    }

    @Test
    @DisplayName("查看数据库")
    void show() {
        System.out.println("select host,user,plugin from mysql.user ");
    }


    @Test
    @DisplayName("第一个测试")
    void t0() {
        System.out.println("hello world");
        log.trace("trace");
        log.warn("warn");
        log.debug("debug");
        log.info("hello");
    }

    @Test
    @DisplayName("方法二")
    void t1() {
        System.out.println("hello world");
    }
}
